package fr.cpe.dp.projet2.model.music;

import fr.cpe.dp.projet2.model.musicBuilder.IMusicBuilder;
import javax.sound.midi.InvalidMidiDataException;
import javax.sound.midi.Sequence;

/**
 *
 * @author Benoit
 */
public class BuildedMusic implements IMusic {
    private IMusicBuilder musicBuilder;

    public BuildedMusic(IMusicBuilder musicBuilder) {
        this.musicBuilder = musicBuilder;
    }
    
    
    @Override
    public Sequence getSequence() throws InvalidMidiDataException {
        return musicBuilder.generateSequence();
    }
}
